package com.axend.aerosense.common.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.axend.aerosense.base.bean.BaseBean;

public class UserInfo extends BaseBean implements Parcelable {
    public String userImg;
    public String userName;
    public String userSex;
    public String userEmail;
    public int userVipState;  //0：非vip 1：vip  2：过期vip
    public int userSexType; // 性别类型 0未设定 1男 2女

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userImg);
        dest.writeString(this.userName);
        dest.writeString(this.userSex);
        dest.writeString(this.userEmail);
        dest.writeInt(this.userVipState);
        dest.writeInt(this.userSexType);
    }

    public UserInfo() {
    }

    protected UserInfo(Parcel in) {
        this.userImg = in.readString();
        this.userName = in.readString();
        this.userSex = in.readString();
        this.userEmail = in.readString();
        this.userVipState = in.readInt();
        this.userSexType = in.readInt();
    }

    public static final Parcelable.Creator<UserInfo> CREATOR = new Parcelable.Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel source) {
            return new UserInfo(source);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    public void clean(){
        userImg = "";
        userName = "";
        userSex = "";
        userEmail = "";
        userVipState = 0;
        userSexType = 0;
    }
}

